/**
 * jims
 */
package com.jims.master.modules.blood.dao;

import com.jims.master.common.persistence.CrudDao;
import com.jims.master.common.persistence.annotation.MyBatisDao;
import com.jims.master.modules.blood.entity.BloodInpDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 血液入库明细记录DAO接口
 *
 * @author fengyg
 * @version 2017-04-07
 */
@MyBatisDao
public interface BloodInpDetailDao extends CrudDao<BloodInpDetail> {

    /**
     * 根据入库单号获取入库记录
     * @param bloodInpDetail
     * @return
     * @author fengyg
     */
    public List<BloodInpDetail> getListByInpNo(BloodInpDetail bloodInpDetail);

    /**
     * 获取入库明细
     * @param bloodInpDetail
     * @return
     * @author fengyg
     */
    public BloodInpDetail getInpDetail(BloodInpDetail bloodInpDetail);

    /**
     * 加载血液库存信息
     * @param bloodInpDetail
     * @return
     * @author fengyg
     */
    public List<BloodInpDetail> loadBloodStock(BloodInpDetail bloodInpDetail);

    /**
     * 根据血袋号修改该血袋的库存状态
     * @param bloodId
     * @return
     * @author fengyg
     */
    public int updateStockFlag(@Param("bloodId")String bloodId,@Param("orgId")String orgId);

    /**
     * 根据血袋号更新出库状态
     * @param flag
     * @param bloodId
     * @return
     * @author CTQ
     */
    public int updateFlagByBloodId(@Param("flag")String flag,@Param("bloodId")String bloodId);

    /**
     * 获取所有血袋号
     * @return
     * @author fengyg
     */
    public List<BloodInpDetail> getBloodIdList(@Param("orgId")String orgId);

    /**
     * 入库单查询
     * @param bloodInpDetail
     * @return
     * @author fengyg
     */
    public List<BloodInpDetail> bloodImportQuery(BloodInpDetail bloodInpDetail);

}